From 4878878a4538dde45462cf0900a16a9cde5ef2f0 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Tue, 9 Aug 2016 10:31:28 -0400 Subject: [PATCH] version/livepatch: Move xen_build_id_check to version.h It makes more sense for it to be there. However that means the version.h has now a dependency on as the Elf_Note is a macro. The elfstructs.h has a dependency on types.h as well so we need that. We cannot put that #include in elfstructs.h as that file is used by tools and they do not have such file. Reviewed-by: Jan Beulich Reviewed-by: Ross Lagerwall Signed-off-by: Konrad Rzeszutek Wilk --- xen/include/xen/livepatch.h | 2 -- xen/include/xen/version.h | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/livepatch.h b/xen/include/xen/livepatch.h index ed498439c3..02f4572fb5 100644 --- a/xen/include/xen/livepatch.h +++ b/xen/include/xen/livepatch.h @@ -42,8 +42,6 @@ int livepatch_op(struct xen_sysctl_livepatch_op *); void check_for_livepatch_work(void); unsigned long livepatch_symbols_lookup_by_name(const char *symname); bool_t is_patch(const void *addr); -int xen_build_id_check(const Elf_Note *n, unsigned int n_sz, - const void **p, unsigned int *len); /* Arch hooks. */ int arch_livepatch_verify_elf(const struct livepatch_elf *elf); diff --git a/xen/include/xen/version.h b/xen/include/xen/version.h index 400160fa52..97c247a5eb 100644 --- a/xen/include/xen/version.h +++ b/xen/include/xen/version.h @@ -1,6 +1,9 @@ #ifndef __XEN_VERSION_H__ #define __XEN_VERSION_H__ +#include +#include + const char *xen_compile_date(void); const char *xen_compile_time(void); const char *xen_compile_by(void); @@ -15,4 +18,9 @@ const char *xen_banner(void); const char *xen_deny(void); int xen_build_id(const void **p, unsigned int *len); +#ifdef BUILD_ID +int xen_build_id_check(const Elf_Note *n, unsigned int n_sz, + const void **p, unsigned int *len); +#endif + #endif /* __XEN_VERSION_H__ */ -- 2.30.2